/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cassoftViews;

import javax.swing.JButton;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

/**
 *
 * @author Prophet
 */
public class SetUpUI extends javax.swing.JFrame {

    /**
     * Creates new form DatabaseLogin
     */
    public SetUpUI() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPasswordField1 = new javax.swing.JPasswordField();
        mysqlPassword = new javax.swing.JPasswordField();
        mysqlUsername = new javax.swing.JTextField();
        preferredPassword = new javax.swing.JPasswordField();
        preferredUsername = new javax.swing.JTextField();
        done = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        jPasswordField1.setText("jPasswordField1");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setAlwaysOnTop(true);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
        getContentPane().add(mysqlPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 380, 180, 30));
        getContentPane().add(mysqlUsername, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 310, 180, 30));
        getContentPane().add(preferredPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 230, 180, 30));
        getContentPane().add(preferredUsername, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 160, 180, 30));

        done.setBackground(new java.awt.Color(242, 118, 34));
        done.setText("Done");
        getContentPane().add(done, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 425, 180, 30));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/database_setup.png"))); // NOI18N
        getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 300, -1));

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    /**
     * Getting the preferred username for set up
     * @return preferred username
     */
    public JTextField username(){
        return preferredUsername;
    }
    
    /**
     * Getting the preferred password of the user for set up
     * @return preferred password
     */
    public JPasswordField password(){
        return preferredPassword;
    }
    
    /**
     * Get the mysql username of the user
     * @return the user's mysql username
     */
    public JTextField mysqlUsername(){
        return mysqlUsername;
    }
    
    /**
     * Get the mysql password of the user for setup
     * @return the user's mysql password 
     */
    public JPasswordField mysqlPassword(){        
        return mysqlPassword;
    }
    
    /**
     * A button that indicates that the form has been fully filled
     * @return Done JButton
     */
    public JButton getDoneBtn(){
        return done;
    }
    
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(SetUpUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(SetUpUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(SetUpUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(SetUpUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new SetUpUI().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton done;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPasswordField jPasswordField1;
    private javax.swing.JPasswordField mysqlPassword;
    private javax.swing.JTextField mysqlUsername;
    private javax.swing.JPasswordField preferredPassword;
    private javax.swing.JTextField preferredUsername;
    // End of variables declaration//GEN-END:variables
}
